package com.dao;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;

public class T {

	/**
	 * 
	
	public static void main(String[] args) {
		Date d=new Date();   
		Timestamp ts= new Timestamp(System.currentTimeMillis());
		 SimpleDateFormat df=new SimpleDateFormat("yyyy-MM-dd 17:mm:ss");   
			SimpleDateFormat df3 = new SimpleDateFormat("yyyy-MM-dd 18:00:00");
			SimpleDateFormat df4 = new SimpleDateFormat("yyyy-MM-dd 16:00:00");
		 System.out.println("今天的日期："+df.format(ts));   
		 System.out.println("两天前的日期：" + df.format(new Date(d.getTime() - (long)2  * 60 * 60 * 1000)));  
		//   System.out.println("三天后的日期：" + df.format(new Date(d.getTime() + (long)3 * 24 * 60 * 60 * 1000)));
		 String t= df.format(ts);
		 String t3= df3.format(ts);
		 String t4= df4.format(ts);
		String tt=df.format(new Date(d.getTime() - (long)2  * 60 * 60 * 1000));
		if(t.compareTo(t3)<0){
			 System.out.println("da");   
		}
		else{
			 System.out.println("xx");   
		}
		if(t.compareTo(t4)>0){
			 System.out.println("da");   
		}
		else{
			 System.out.println("xx");   
		}
	}
	 * @throws Exception 
 */
	
	public static void main(String arg[]) throws Exception{

/*		MessageDigest md =  MessageDigest.getInstance("SHA");

		String msg=" ";

		byte[] b = msg.getBytes();
		byte[] b1 = md.digest(b);//
		BASE64Encoder encoder = new BASE64Encoder();
		 System.out.println(encoder.encode(b1));   
		} */
		/*String s="2013-05-03 13:00:00";
		String l=s.substring(0, s.indexOf(" "));
		System.out.println(l+" 14:00:00");
		String ss[]=s.split(" ");*/
		String a="mary, mary dfdfsdf";
		int i=a.lastIndexOf("mary",10);
		
		System.out.println(i);
		
}
}